package seotools.positions.direct;

public class DirectHelper {
    public static String trimModel(String model, String vendor) {
        if (vendor.equalsIgnoreCase("nokia")) {
            model = nokiaTrimModel(model);
        } else if (vendor.equalsIgnoreCase("sony ericsson") || vendor.equalsIgnoreCase("sony")) {
            model = seTrimModel(model);
        } else if (vendor.equalsIgnoreCase("samsung")) {
            model = samsungTrimModel(model);
        } else if (vendor.equalsIgnoreCase("lg")) {
            model = lgTrimModel(model);
        } else if (vendor.equalsIgnoreCase("htc")) {
            model = htcTrimModel(model);
        } else if (vendor.equalsIgnoreCase("motorola")) {
            model = motorolaTrimModel(model);
        } else if (vendor.equalsIgnoreCase("blackberry")) {
            model = blackberryTrimModel(model);
        } else if (vendor.equalsIgnoreCase("canon")) {
            model = canonTrimModel(model);
        }
        model = model.trim();
        model = model.replaceAll("\\([^\\)]+\\)", "");
        return model;
    }

    private static String canonTrimModel(String model) {
        model = model.replace("PowerShot S230", "PowerShot,S230");
        model = model.replace("PowerShot S330", "S330");
        model = model.replace("PowerShot S500", "S500");
        model = model.replace("PowerShot S410", "S410");
        model = model.replace("Ixus Wireless", "Ixus");
        return model;
    }

    private static String blackberryTrimModel(String model) {
        model = model.replace("Bold 9650", "9650,Bold");
        model = model.replace("Bold 9700", "9700");
        model = model.replace("Bold 9900", "9900");
        model = model.replace("Bold 9930", "9930");
        model = model.replace("Style 9670", "9670");
        model = model.replace("Torch 9850", "Torch,9850");
        model = model.replace("Torch 9860", "9860");
        model = model.replace("Torch 9810", "9810");
        model = model.replace("Pearl 9105", "9105");
        model = model.replace("Curve 3G 9300", "9300,Curve");
        model = model.replace("Curve 8310", "8310");
        model = model.replace("Curve 8520", "8520");
        model = model.replace("Curve 8900", "8900");
        model = model.replace("Curve 9350", "9350");
        model = model.replace("Curve 9360", "9360");
        model = model.replace("Curve 9370", "9370");
        model = model.replace("Pearl 3G 9100", "9100,Pearl");
        model = model.replace("Pearl 9100", "9100,Pearl");
        model = model.replace("Pearl 3G 9105", "9105");
        model = model.replace("Flip 8220", "8220,Flip");
        model = model.replace("Pearl 8220", "8220");
        model = model.replace("Storm 9500", "9500,Storm");
        model = model.replace("Storm 9530", "9530");
        model = model.replace("Storm2 9520", "9520,Storm2");
        model = model.replace("Torch 9800", "9800");
        model = model.replace("Tour 9630", "9630,Tour");
        model = model.replace("Storm2 9550", "9550");
        model = model.replace("Pearl 8100", "8100");
        model = model.replace("Pearl 8110", "8110");
        model = model.replace("Pearl 8120", "8120");
        model = model.replace("Pearl 8130", "8130");
        model = model.replace("Pearl 8230", "8230");
        model = model.replace("Pearl 8100c", "8100c");
        model = model.replace("Curve 8300", "8300");
        model = model.replace("Curve 8320", "8320");
        model = model.replace("Curve 8530", "8530");
        model = model.replace("Curve 3G 9330", "9330");
        model = model.replace("8830 World Edition", "8830");
        model = model.replace("Curve 8350i", "8350i");
        model = model.replace("Curve 8330", "8330");
        model = model.replace("Bold 9000", "9000");
        model = model.replace("Bold 9780", "9780");
        return model;
    }

    private static String motorolaTrimModel(String model) {
//        model = model.replace("Droid", "");
//        model = model.replace("MB220", "");
        model = model.replace("Accompli 388", "388");
        model = model.replace("ATRIX 4G", "ATRIX");
        model = model.replace("BACKFLIP", "mb300");
        model = model.replace("DROID X ME811", "ME811");
        model = model.replace("xt720 ME722", "ME722");
        model = model.replace("xt720 2 ME722", "ME722");
        model = model.replace("Milestone XT883", "XT883");
        model = model.replace("Milestone XT720", "XT720");
        model = model.replace("Milestone XT710", "XT710");
        model = model.replace("Milestone XT701", "XT701");
        model = model.replace("Milestone 2 A953", "A953");
        model = model.replace("MILESTONE 2 ME722", "ME722");
        model = model.replace("MILESTONE", "xt720");
        model = model.replace("MOTO ME525", "ME525");
        model = model.replace("MOTO MT620", "MT620");
        model = model.replace("MOTO MT870", "MT870");
        model = model.replace("MOTO XT316", "XT316");
        model = model.replace("MOTO XT882", "XT882");
        model = model.replace("Motocubo A45", "A45");
        model = model.replace("MOTOFONE F3", "F3");
        model = model.replace("MOTOKRZR K3", "K3");
        model = model.replace("MOTOMING A1200E", "A1200E");
        model = model.replace("MOTORAZR maxx V6", "V6");
        model = model.replace("MOTORAZR maxx VE", "VE");
        model = model.replace("V6 Ferrari Challenge", "V6");
        model = model.replace("MOTORAZR V3i Dolce&Gabbana", "V3i");
        model = model.replace("MOTORIZR Z3", "Z3");
        model = model.replace("MOTORIZR Z8", "Z8");
        model = model.replace("RIZR Z8", "Z8");
        model = model.replace("RIZR Z1", "Z1");
        model = model.replace("RIZR Z3", "Z3");
        model = model.replace("RIZR Z10", "Z10");
        model = model.replace("MOTOROKR E6", "E6");
        model = model.replace("MOTOROKR U9", "U9");
        model = model.replace("MOTO U9", "U9");
        model = model.replace("MOTOROKR Z6", "Z6");
        model = model.replace("ROKR Z6", "Z6");
        model = model.replace("MOTOSLVR L7e", "L7e");
        model = model.replace("MOTOSLVR L9", "L9");
        model = model.replace("Photon 4G", "4G");
        model = model.replace("RAZR V3 Black", "V3");
        model = model.replace("RAZR V3", "V3");
        model = model.replace("RAZR V3IM", "V3IM");
        model = model.replace("Razr V3", "V3");
        model = model.replace("Razr V3c", "V3c");
        model = model.replace("Razr V3m", "V3m");
        model = model.replace("Razr V3T", "V3T");
        model = model.replace("Razr V3xx", "V3xx");
        model = model.replace("Razr V3Z", "V3Z");
        model = model.replace("Razr V3E", "V3E");
        model = model.replace("RAZR V3i", "V3i");
        model = model.replace("Razr V3i", "V3i");
        model = model.replace("RAZR V3x", "V3x");
        model = model.replace("Razr2 V8", "V8");
        model = model.replace("RAZR2 V8", "V8");
        model = model.replace("Razr2 V9", "V9");
        model = model.replace("ROKR E1", "E1");
        model = model.replace("ROKR E2", "E2");
        model = model.replace("ROKR E3", "E3");
        model = model.replace("ROKR E8", "E8");
        model = model.replace("ROKR W6", "W6");
        model = model.replace("Rokr EM28", "EM28");
        model = model.replace("ROKR EM35", "EM35");
        model = model.replace("Slvr L6", "L6");
        model = model.replace("Slvr L7", "L7");
        model = model.replace("SLVR L8", "L8");
        model = model.replace("Slvr L7i", "L7i");
        model = model.replace("Slvr L2", "L2");
        model = model.replace("Slvr L9", "L9");
//        model = model.replace("KRZR K1", "KRZK,K1");
        model = model.replace("KRZR K3", "K3");
        model = model.replace("xt720 2", "xt720");
        model = model.replace("ROKR ZN50", "ZN50");
        model = model.replace("Motozine ZN5", "ZN50");
//        model = model.replace("Moto Q", "Moto Q");
        model = model.replace("PEBL U6", "U6");
        model = model.replace("PEBL2 U9", "U9");
        model = model.replace("SPICE Key", "Spice");
        model = model.replace("Timeport 250", "250");
        model = model.replace("Timeport 260", "260");
        model = model.replace("Timeport 280", "280");
        model = model.replace("Timeport 720", "720");
        model = model.replace("Timeport 722i", "722i");
        model = model.replace("Timeport 270c", "270c");
        model = model.replace("W233 Renew", "W233");
        model = model.replace("Lifestyle 285", "285");
        model = model.replace("Prolife 300", "300");
        model = model.replace("Prolife 500", "500");
        model = model.replace("Cliq 2", "Cliq");
        model = model.replace("DROID 2", "DROID");
        model = model.replace("DROID 3", "DROID");
        model = model.replace("Moto Z10", "Z10");
        model = model.replace("MOTO Z10", "Z10");
        model = model.replace("Dext MB220", "MB220");
        model = model.replace("Flip P", "Flip");
        model = model.replace("EX130 Wilder", "EX130");
        model = model.replace("EX225 Motokey Social", "EX225");
        model = model.replace("EX245 Mototv", "EX245");
        model = model.replace("W7 Active Edition", "W7");
        model = model.replace("Slvr L7 i-mode", "L7");
        model = model.replace("L7 i-mode", "L7");
        model = model.replace("Razr Maxx v6", "v6");
        return model;
    }

    private static String htcTrimModel(String model) {
        model = model.replace("A6161 Magic", "A6161,Magic");
        model = model.replace("A6262 Hero", "A6262,Hero");
        model = model.replace("A6363 Legend", "A6363,Legend");
        model = model.replace("A6380 Gratia", "A6380,Gratia");
        model = model.replace("A8181 Desire", "A8181,Desire");
        model = model.replace("EVO Shift 4G", "EVO,Shift");
        model = model.replace("Inspire 4G", "Inspire");
        model = model.replace("P3350 Love", "P3350");
        model = model.replace("P3400 Gene", "P3400,Gene");
        model = model.replace("P3450 Touch", "P3450,Touch");
        model = model.replace("P3470 Pharos", "P3470,Pharos");
        model = model.replace("P4350 Herald", "P4350,Herald");
        model = model.replace("P6300 Panda", "P6300,Panda");
        model = model.replace("P6500 Sirius", "P6500,Sirius");
        model = model.replace("S522 Maple", "S522,Maple");
        model = model.replace("T8290 Max 4G", "T8290,Max");
        model = model.replace("T-Mobile G1", "T-Mobile,G1");
        model = model.replace("8600 MTeoR", "8600,MTeoR");
        model = model.replace("x9500 Shift", "x9500");
//        model = model.replace("Desire S", "Desire");
        model = model.replace("S511 Willow", "S511,Willow");
        model = model.replace("P3452 Touch", "P3452");
        model = model.replace("7 Mozart", "Mozart");
        model = model.replace("T8698 Mozart", "T8698,Mozart");
        model = model.replace("F5151 Freestyle", "F5151,Freestyle");
        model = model.replace("7 Pro", "Pro");
        model = model.replace("7 Surround", "Surround");
        model = model.replace("7 Trophy", "Trophy");
        model = model.replace("A3333 WildFire", "A3333,Wildfire");
        model = model.replace("A510e Wildfire S", "A510e,Wildfire S");
        model = model.replace("A3232 Tattoo", "A3232,Tattoo");
        model = model.replace("A3288 Tattoo", "A3288");
        model = model.replace("Google Nexus One", "Nexus");
        model = model.replace("P3700 Touch Diamond", "P3700,Diamond");
        model = model.replace("P4550 TyTN II Kaiser", "P4550,Kaiser");
        model = model.replace("P4550 TyTN 2 Kaiser", "P4550");
        model = model.replace("T5353 Touch Diamond 2", "T5353,Diamond 2");
        model = model.replace("T7272 Touch Pro", "T7272");
        model = model.replace("T7378 Fortress", "T7378,Fortress");
        model = model.replace("T8282 Touch HD", "T8282,HD");
        model = model.replace("9600 TyTN Hermes", "9600,Hermes");
        model = model.replace("T7373 Touch Pro 2", "T7373");
        model = model.replace("P5500 Touch Dual", "P5500");
        model = model.replace("P5520 Touch Dual", "P5520");
        model = model.replace("P5530 Touch Dual", "P5530");
        model = model.replace("A9191 Desire HD", "A9191");
        model = model.replace("A9292 EVO 4G", "A9292");
        model = model.replace("P3300 Artemis", "P3300,Artemis");
        model = model.replace("P3600 Trinity", "P3600,Trinity");
        model = model.replace("P3650 Touch Cruise", "P3650,Cruise");
        model = model.replace("ThunderBolt 4G", "ThunderBolt");
        model = model.replace("Touch Enhanced", "Touch");
        model = model.replace("T2223 Touch Viva", "T2223,Viva");
        model = model.replace("T3232 Touch 3G", "T3232");
        model = model.replace("T3333 Touch 2", "T3333,Touch 2");
        model = model.replace("T4242 Touch Cruise 09", "T4242");
        model = model.replace("T4242 Touch Cruise 2", "T4242");
        model = model.replace("T5555 HD Mini", "T5555,HD Mini");
        model = model.replace("T8585 HD2 Leo", "T8585,Leo");
        model = model.replace("X7500 Advantage", "X7500");
        model = model.replace("X7501 Advantage", "X7501");
        model = model.replace("X7510 Advantage", "X7510");
        model = model.replace("T4242 Touch Cruise II", "T4242");
        model = model.replace("Touch Cruise II T4243", "T4243");
        model = model.replace("z710e Sensation", "z710e,Sensation");
        model = model.replace("Z710e Sensation", "z710e,Sensation");
        model = model.replace("X315e Sensation XL", "X315e,Sensation XL");
        model = model.replace("Z715e Sensation XE", "Z715e,Sensation XE");
        model = model.replace("O2 XDA Flint", "Flint,XDA");
        model = model.replace("S510e Desire S", "S510e,Desire S");
        model = model.replace("A3333 Wildfire", "A3333,Wildfire");
//        model = model.replace("Incredible S", "Incredible");
        model = model.replace("S710e Incredible S", "S710e,Incredible S");
        model = model.replace("Sensation 4G", "Sensation");
        model = model.replace("T-Mobile G2", "T-Mobile,G2");
        model = model.replace("S350 MTeoR", "S350,MTeoR");
        model = model.replace("S730 Wings", "S730,Wings");
        model = model.replace("S710 Vox", "S710,Vox");
        model = model.replace("7 T8686 Trophy", "T8686,Trophy");
        model = model.replace("A7272 Desire Z", "A7272, Desire z");
        model = model.replace("7 T8698 Mozart", "T8698,Mozart");
        model = model.replace("A310e Explorer", "A310e,Explorer");
        model = model.replace("A810e Chacha", "A810e,Chacha");
        model = model.replace("C510e Salsa", "C510e,Salsa");
        model = model.replace("X515m EVO 3D", "X515m,Evo 3D");
        model = model.replace("Velocity 4G", "Velocity");
        model = model.replace("Adr6300vw Incredible", "Adr6300vw");
        model = model.replace("Evo Design 4G", "Evo 4G");
        model = model.replace("G5 Smart", "G5");
        model = model.replace("HD7 T9292", "HD7,T9292");
        model = model.replace("A3288 Click", "A3288");
        model = model.replace("F3188 Smart", "F3188");
        model = model.replace("T5588 Pure", "T5588");
        model = model.replace("P3702 Victor", "P3702");
        model = model.replace("Ddr6200vw Droid Eris", "Ddr6200vw");
        model = model.replace("A9292 Evo 4g Supersonic", "A9292");
        model = model.replace("T7377 Rhodium", "T7377");
        model = model.replace("XV6175 Ozone", "XV6175");
        model = model.replace("XV6975 Imagio", "XV6975");
        model = model.replace("A6366 Liberty", "A6366");
        model = model.replace("T5555 Photon", "T5555");
        model = model.replace("P4500 TyTN Hermes", "P4500,TyTN");
        model = model.replace("P3452 Elfin", "P3452");
        model = model.replace("S521 Snap", "S521");
        model = model.replace("A6380 Aria", "A6380");
        return model;
    }

    private static String lgTrimModel(String model) {
//        model = model.replace("Optimus Me", "");
        model = model.replace("Optimus Titanium Black", "Titanium");
        model = model.replace("P500 Optimus One", "P500");
        model = model.replace("T310i Cookie Wi-Fi", "T310i");
        model = model.replace("BL40 New Chocolate", "BL40");
        model = model.replace("KG800 Chocolate", "KG800");
//        model = model.replace("Viewty Smart", "");
        model = model.replace("BL20 Chocolate", "BL20");
        model = model.replace("BL40 Chocolate", "BL40");
        model = model.replace("BL20E New Chocolate", "BL20E");
        model = model.replace("CB630 Invision", "CB630");
        model = model.replace("Cookie 3G T320", "T320");
        model = model.replace("Cookie Style T310", "T310");
        model = model.replace("Cookie WiFi T310i", "T310i");
        model = model.replace("E900 Optimus 7", "E900");
        model = model.replace("GC900 Viewty Smart", "GC900");
        model = model.replace("GS290 Cookie Fresh", "GS290");
        model = model.replace("GS500 Cookie Plus", "GS500");
        model = model.replace("GT400 Viewty Smile", "GT400");
        model = model.replace("KE800 Chocolate", "KE800");
        model = model.replace("Optimus 2X SU660", "SU660");
        model = model.replace("Optimus Big LU6800", "LU6800");
        model = model.replace("Optimus Mach LU3000", "LU3000");
        model = model.replace("ptimus One P500", "P500");
        model = model.replace("P350 Optimus", "P350");
        model = model.replace("P690 Optimus Net", "P690");
        model = model.replace("P970 Optimus Black", "P970");
        model = model.replace("Wink Style T310", "T310");
        model = model.replace("EGO Wi-Fi", "EGO");
        model = model.replace("GD880 Mini", "GD880");
        model = model.replace("GD900 Crystal", "GD900");
        model = model.replace("GT540 Optimus", "GT540");
        model = model.replace("GW300 Viewty", "GW300");
        model = model.replace("KC910 Renoir", "KC910");
        model = model.replace("KC910i Renoir", "KC910i");
        model = model.replace("KE850 Prada", "KE850");
        model = model.replace("KE990 Viewty", "KE990");
        model = model.replace("KF900 Prada", "KF900");
        model = model.replace("KM900 Arena", "KM900");
        model = model.replace("Optimus 2X", "Optimus");
        model = model.replace("P350 Me", "P350");
        model = model.replace("Thrill 4G", "Thrill");
        model = model.replace("Vu Plus", "Vu");
        model = model.replace("Wink 3G T320", "T320");
        model = model.replace("U990i Viewty Lite", "U990i");
        model = model.replace("U990 Viewty", "U990");
        model = model.replace("KF350 Ice Cream", "KF350");
        model = model.replace("CU920 Vu-TV", "CU920");
        model = model.replace("KC910i Refresh", "KC910i");
        model = model.replace("KP500 Cookie", "KP500");
        model = model.replace("LX570 Muziq", "LX570");
        model = model.replace("KE970 Shine", "KE970");
        model = model.replace("KF600 Shine", "KE970");
        model = model.replace("KG70 Shine", "KG70");
        model = model.replace("KG70c Shine", "KG70c");
        model = model.replace("KU970 Shine", "KU970");
        model = model.replace("KC550 Orsay", "KC550");
        model = model.replace("KF757 Secret", "KF757");
        model = model.replace("CF750 Secret", "CF750");
        model = model.replace("KP501 Cookie", "KP501");
        model = model.replace("KE800 Platinum", "KE800");
        model = model.replace("KF750 Secret", "KF750");
        model = model.replace("KF755 Secret", "KF755");
        model = model.replace("AX585 Rhythm", "AX585");
        model = model.replace("KP215 Scorpius", "KP215");
        model = model.replace("UX585 Rhythm", "UX585");
        model = model.replace("GT500 Puccini", "GT500");
        model = model.replace("GT405 Viewty GT", "GT405");
        model = model.replace("E720 Optimus Chic", "E720");
        model = model.replace("GU280 Popcorn", "GU280");
        model = model.replace("GW300 Onliner", "GW300");
        model = model.replace("T300 Cookie Lite", "T300");
        model = model.replace("T320 Cookie Style", "T320");
        model = model.replace("CU915 Vu", "CU915");
        model = model.replace("CU920 Vu", "CU920");
        model = model.replace("KE770 Shine", "KE770");
        model = model.replace("TE365 Neon", "TE365");
        model = model.replace("KP106 Ruby", "KP106");
        model = model.replace("KP210 Aries", "KP210");
        return model;
    }

    private static String samsungTrimModel(String model) {
        model = model.replace("S5363 Galaxy Y", "S5363");
        model = model.replace("B5510 Galaxy Y Pro", "B5510");
        model = model.replace("B5512 Galaxy Y Pro Duos", "B5512");
        model = model.replace("S5300 Galaxy Pocket", "S5300");
        model = model.replace("S5302 Galaxy Pocket Duos", "S5302");
        model = model.replace("i8150 Galaxy W", "i8150,Galaxy W");
        model = model.replace("Galaxy xCover S5690", "S5690");
        model = model.replace("i8000 Omnia II", "I8000");
        model = model.replace("B7620 Giorgio Armani", "B7620");
        model = model.replace("P520 Giorgio Armani", "P520");
        model = model.replace("S5830 Galaxy Ace", "S5830,Galaxy Ace");
        model = model.replace("i8160 Galaxy Ace II", "i8160,Ace II");
        model = model.replace("i8160 Galaxy Ace 2", "Ace 2");
        model = model.replace("B7510 Galaxy Pro", "B7510,Galaxy Pro");
        model = model.replace("B7800 Galaxy M Pro", "B7800,Galaxy M");
        model = model.replace("S6802 Galaxy Ace DuoS", "S6802");
        model = model.replace("S5830i Galaxy Ace La Fleur", "S5830i");
        model = model.replace("S6500 Galaxy Mini 2", "S6500");
        model = model.replace("S5222 Star 3 DuoS", "S5222");
        model = model.replace("S5220 Star 3", "S5220");
        model = model.replace("i5500 Galaxy 550", "i5500,Galaxy 550");
        model = model.replace("C6112 Duos", "C6112");
        model = model.replace("C6712 Star II DUOS", "C6712");
//        model = model.replace("Galaxy Gio GT-S5660", "Gio,S5660");
        model = model.replace("N7000 Galaxy Note", "N7000,Galaxy Note");
        model = model.replace("N7100 Galaxy Note II", "N7100,Note II");
        model = model.replace("N7100 Galaxy Note 2", "Note 2");
        model = model.replace("M3200 Beat S", "M3200,Beat S");
        model = model.replace("S3030 Tobi", "S3030,Tobi");
        model = model.replace("E1225 Duos", "E1225");
//        model = model.replace("Galaxy S 4G", "Galaxy S");
//        model = model.replace("Galaxy S II 4G", "Galaxy S");
//        model = model.replace("Galaxy S II ATT", "Galaxy S");
//        model = model.replace("Galaxy S II LTE", "Galaxy S");
        model = model.replace("C5010 Squash", "C5010,Squash");
        model = model.replace("I5700 Galaxy Spica", "I5700");
        model = model.replace("i5800 Galaxy 3", "I5800");
        model = model.replace("I6220 Star TV", "I6220");
        model = model.replace("I6500U Galaxy", "I6500U");
        model = model.replace("I8000 WiTu AMOLED", "I8000");
        model = model.replace("I8150 Galaxy W", "I8150");
        model = model.replace("I8350 Omnia W", "I8350");
        model = model.replace("i8350 Omnia W", "i8350");
        model = model.replace("i8510 Innov8", "I8510");
        model = model.replace("I8700 Omnia 7", "I8700");
        model = model.replace("i8700 Omnia 7", "I8700");
        model = model.replace("I9000 Galaxy S", "I9000");
        model = model.replace("I9001 Galaxy S Plus", "I9001");
        model = model.replace("i9003 Galaxy SL", "i9003");
//        model = model.replace("I9010 Galaxy S", "I9010");
        model = model.replace("I9100 Galaxy S II", "I9100");
        model = model.replace("I9100 Galaxy S2", "I9100");
        model = model.replace("i9100 Galaxy S II", "i9100");
        model = model.replace("I9103 Galaxy R", "I9103");
        model = model.replace("M3710 Corby Beat", "M3710");
        model = model.replace("B3310 Corby Mate", "B3310");
        model = model.replace("M5650 Lindy", "M5650,Lindy");
        model = model.replace("M7500 Emporio Armani", "M7500");
        model = model.replace("S3370 Corby 3G", "S3370");
        model = model.replace("S3650 Corby", "S3650");
        model = model.replace("S3850 Corby II", "S3850");
        model = model.replace("B3210 Corby txt", "B3210");
        model = model.replace("C3300 Hello Kitty", "C3300");
        model = model.replace("S5150 Diva folder", "S5150,Diva");
        model = model.replace("S5150 La Fleur", "S5150");
        model = model.replace("C3520 La Fleur", "C3520");
        model = model.replace("E2530 La Fleur", "E2530");
        model = model.replace("C3530 La Fleur", "C3530");
        model = model.replace("S7070 La Fleur", "S7070");
        model = model.replace("T959 Vibrant", "T959");
        model = model.replace("D700 Galaxy S Sepic 4g", "D700");
        model = model.replace("S3600i Romantic Pink", "S3600i");
        model = model.replace("i500 Galaxy S Fascinate", "i500");
        model = model.replace("B6520 Omnia Pro 5", "B6520");
        model = model.replace("B7600 Omnia Pro", "B7600");
        model = model.replace("A877 Impress", "A877,Impress");
        model = model.replace("i5801 Galaxy Appolo", "i5801,Appolo");
        model = model.replace("S5230W Star WiFi", "S5230W");
        model = model.replace("S5250 Wave 2", "S5250,Wave 2");
        model = model.replace("S8600 Wave III", "S8600,Wave 3");
        model = model.replace("S5250 Wave 525", "S5250");
        model = model.replace("7230 Wave 723", "7230,Wave 723");
        model = model.replace("S7230e Wave 723", "S7230e,Wave 723");
        model = model.replace("S7500 Galaxy Ace Plus", "S7500,Ace Plus");
        model = model.replace("Yp-g50c Galaxy Player 50", "Yp-g50c,Galaxy Player");
        model = model.replace("S3550 Shark Slider", "S3550");
        model = model.replace("S5260 Star II", "S5260");
        model = model.replace("S5330 Wave 2 Pro", "S5330");
        model = model.replace("S5360 Galaxy Y", "S5360");
        model = model.replace("S6102 Galaxy Y Duos", "S6102");
        model = model.replace("S5380 Wave Y", "S5380");
        model = model.replace("S5570 Galaxy Mini", "S5570,Galaxy Mini");
        model = model.replace("S5750 Wave 575", "S5750");
        model = model.replace("S7070 Diva", "S7070");
        model = model.replace("C3510t Genoa TV", "C3510t");
        model = model.replace("S7250 Wave M", "S7250");
        model = model.replace("S8000 Jet", "S8000");
        model = model.replace("S8300 UltraTOUCH", "S8300");
        model = model.replace("S8500 Wave", "S8500");
        model = model.replace("S8530 Wave II", "S8530");
        model = model.replace("S9402 Ego", "S9402,Ego");
        model = model.replace("P1000 Galaxy Tab", "P1000,Tab");
        model = model.replace("Propel Pro", "Propel");
        model = model.replace("S8600 Wave 3", "S8600");
        model = model.replace("3510 Beat b", "3510");
        model = model.replace("A767 Propel", "A767");
        model = model.replace("D780 Duos", "D780");
        model = model.replace("B7722 DuoS", "B7722");
        model = model.replace("B5722 DuoS", "B5722");
        model = model.replace("B5702 DuoS", "B5702");
        model = model.replace("C5212 DuoS", "C5212");
        model = model.replace("E2232 DuoS", "E2232");
        model = model.replace("C3300 Champ", "C3300");
        model = model.replace("E1182 DuoS", "E1182");
        model = model.replace("D880 DUOS", "D880");
        model = model.replace("F110 Adidas miCoach", "F110,Adidas");
        model = model.replace("i8910 Omnia HD", "i8910");
        model = model.replace("i900 WiTu", "i900");
        model = model.replace("P520 Armani", "P520");
        model = model.replace("U800 Soulb", "U800,Soulb");
        model = model.replace("SHW-M220L Galaxy Neo", "M220L,Galaxy Neo");
        model = model.replace("Galaxy Prevail", "Prevail");
        model = model.replace("Galaxy S II Epic 4G Touch", "Epic 4G");
        model = model.replace("P1010 Galaxy Tab Wi-Fi", "P1010");
        model = model.replace("i6410 M1", "i6410");
        model = model.replace("C3510 Genoa", "C3510");
        model = model.replace("J800 Luxe", "J800");
        model = model.replace("i8520 Halo", "i8520");
        model = model.replace("C3312 Champ Deluxe DuoS", "C3312");
        model = model.replace("C3332 Champ 2 DuoS", "C3332");
        model = model.replace("C3330 Champ 2", "C3330");
        model = model.replace("E2652 Champ DuoS", "E2652");
        model = model.replace("C3212 DuoS", "C3212");
        model = model.replace("E2152 DuoS", "E2152");
        model = model.replace("C3200 Monte Bar", "C3200");
        model = model.replace("i9103 Galaxy R", "i9103,Galaxy R");
        model = model.replace("i9010 Galaxy S", "i9010,Galaxy S");
        model = model.replace("S7562 Galaxy S DuoS", "S7562");
        model = model.replace("i9100 Galaxy S 2", "i9100,Galaxy S 2,Galaxy S ii");
        model = model.replace("C6712 Star II DuoS", "C6712");
        model = model.replace("i5510 Galaxy 551", "i5510,Galaxy 551");
        model = model.replace("S5330 Wave 533", "S5330,Wave 533");
        model = model.replace("S5780 Wave 578", "S5780,Wave 578");
        model = model.replace("S6802 527ce DuoS", "S6802,527ce");
        model = model.replace("E2550 Monte", "E2550");
//        model = model.replace("Galaxy Xcover", "Xcover");
//        model = model.replace("CorbyPRO", "");
//        model = model.replace("Corby 3G", "Corby");
//        model = model.replace("CorbyTXT", "");
//        model = model.replace("Mythic", "");
        model = model.replace("Conquer 4G", "Conquer");
        model = model.replace("Exhibit 4G", "Exhibit");
        model = model.replace("Galaxy Tab 10.1", "Tab");
        model = model.replace("Galaxy Tab 7.7", "Tab");
        model = model.replace("Galaxy Tab 8.9", "Tab");
//        model = model.replace("Tab LTE", "LTE");
//        model = model.replace("10.1 3G", "");
//        model = model.replace("8.9TE", "");
//        model = model.replace("Tab 8.9 3G", "3G");
        model = model.replace("i9020 Google Nexus S", "i9020,Google Nexus");
        model = model.replace("i9023 Google Nexus S", "i9023");
//        model = model.replace("SMART", "");
//        model = model.replace("Gravity TXT T379", "TXT");
        model = model.replace("B2100 Xplorer", "B2100");
//        model = model.replace("GT-B3210 TXT", "GT-B3210");
//        model = model.replace("GT-B3410W", "B3410W");
//        model = model.replace("B3410W Ch@t", "Ch@t");
//        model = model.replace("GT-B5310 PRO", "GT-B5310");
//        model = model.replace("GT-B5510  Y", "GT-B5510");
//        model = model.replace("GT-B6520 PRO 5", "GT-B6520");
//        model = model.replace("GT-B7300 OmniaLITE", "GT-B7300");
//        model = model.replace("GT-B7320 OmniaPRO", "GT-B7320");
//        model = model.replace("GT-B7330 OmniaPRO", "GT-B7330");
//        model = model.replace("GT-B7350 OmniaPRO 4", "GT-B7350");
//        model = model.replace("GT-B7610 OmniaPRO", "GT-B7610");
//        model = model.replace("GT-B7800  M", "GT-B7800");
//        model = model.replace("GT-C3060R", "C3060R");
//        model = model.replace("GT-C3300K", "C3300K");
        model = model.replace("C3510 Corby Pop", "C3510");
//        model = model.replace("Corby POP", "");
//        model = model.replace("GT-C5010 Squash", "GT-C5010,Squash");
//        model = model.replace("GT-E1080T", "E1080T");
//        model = model.replace("GT-E1225T", "E1225T");
//        model = model.replace("GT-I6500U", "I6500U");
//        model = model.replace("GT-I8000  AMOLED", "GT-I8000");
//        model = model.replace("GT-I8150  W", "GT-I8150");
//        model = model.replace("GT-I8350 W", "GT-I8350");
//        model = model.replace("GT-I8520 Beam", "GT-I8520");
//        model = model.replace("GT-I8700 7", "GT-I8700");
//        model = model.replace("GT-I9103  R", "GT-I9103");
//        model = model.replace("GT-M8800 Pixon", "GT-M8800,Pixon");
//        model = model.replace("GT-M8910 Pixon12", "GT-M8910");
//        model = model.replace("GT-S5150  folder", "GT-S5150,folder");
//        model = model.replace("GT-S5230W  WiFi", "S5230W");
//        model = model.replace("GT-S5360  Y", "GT-S5360");
//        model = model.replace("GT-S5380  Y", "GT-S5380");
        model = model.replace("S5500 Eco", "S5500");
//        model = model.replace("GT-S7230E wave 723", "S7230E");
//        model = model.replace("GT-S7250  M", "GT-S7250");
//        model = model.replace("GT-S8300 TOUCH", "GT-S8300");
//        model = model.replace("Impression", "");
        model = model.replace("P1000  Tab", "P1000");
        model = model.replace("R260 Chrono", "R260");
//        model = model.replace("SCH-R380 Freeform I", "SCH-R380");
//        model = model.replace("SCH-W960 AMOLED 3D", "SCH-W960");
//        model = model.replace("SGH-3510  b", "SGH-3510");
//        model = model.replace("SGH-A767 pel", "SGH-A767");
//        model = model.replace("SGH-A867 Eternity", "SGH-A867,Eternity");
//        model = model.replace("SGH-D900i", "D900i");
//        model = model.replace("SGH-E2510", "E2510");
//        model = model.replace("SGH-E350E", "E350E");
//        model = model.replace("SGH-E910 Serene", "SGH-E910");
//        model = model.replace("SGH-F210 beatz", "SGH-F210");
//        model = model.replace("SGH-F310 Symphony", "SGH-F310,Symphony");
//        model = model.replace("SGH-F330 beatz", "SGH-F330,beatz");
//        model = model.replace("SGH-i770 Saga", "SGH-i770,saga");
//        model = model.replace("SGH-i8910", "i8910");
//        model = model.replace("SGH-i907 Epix", "SGH-i907,epix");
//        model = model.replace("SGH-J600E", "J600E");
//        model = model.replace("SGH-S342i", "S342i");
//        model = model.replace("SGH-S410i", "S410i");
//        model = model.replace("SGH-T401G", "T401G");
//        model = model.replace("SGH-T459 Gravity", "SGH-T459,gravity");
//        model = model.replace("SGH-T919 Behold", "SGH-T919,behold");
//        model = model.replace("SGH-T929 Memoir", "SGH-T929,memoir");
//        model = model.replace("SGH-U800 b", "SGH-U800");
//        model = model.replace("SGH-U810 Renown", "SGH-U810,renown");
//        model = model.replace("SHW-M220L  Neo", "M220L");
//        model = model.replace("SPH-M260 Factor", "SPH-M260,factor");
//        model = model.replace("SPH-M580 Replenish", "SPH-M580,replenish");
        model = model.replace("P1010  Tab Wi-Fi", "P1010");
        model = model.replace("S5150  folder", "S5150");
//        model = model.replace("SGH-", "");
//        model = model.replace("SCH-", "");
//        model = model.replace("GT-", "");
//        model = model.replace("SHW-", "");
//        model = model.replace("STH-", "");
//        model = model.replace("SPH-", "");
//        model = model.replace("Ch@t 527", "527");
        model = model.replace("S5270 Ch@t 527", "S5270");
        model = model.replace("S3350 Ch@t 335", "S3350");
        model = model.replace("B3410W Ch@t", "B3410W");
        model = model.replace("E2550 Slider", "E2550");
        model = model.replace("L810V Steel", "L810V,Steel");
        model = model.replace("M6710 Beat Disc", "M6710");
        model = model.replace("U800 Soul", "U800,Soul");
        model = model.replace("U900 Soul", "U900");
        model = model.replace("S8300 Ultra Touch", "S8300");
        model = model.replace("M8800 Pixon", "M8800");
        model = model.replace("S5230 Star", "S5230");
        model = model.replace("M8910 Pixon 12", "M8910");
        model = model.replace("B7300 Omnia lite", "B7300");
        model = model.replace("B7330 Omnia Pro", "B7330");
        model = model.replace("B7610 Omnia Pro", "B7610");
        model = model.replace("B7320 Omnia Pro", "B7320");
        model = model.replace("B7300 Omnia Lite", "B7300");
        model = model.replace("S7350 Ultra Slide", "S7350");
        model = model.replace("S7550 Blue Earth", "S7550");
        model = model.replace("i5700 Galaxy Spica", "i5700");
        model = model.replace("I9100 Galaxy S 2", "I9100");
        model = model.replace("S5600v Blade", "S5600v");
        model = model.replace("B5310 Corby PRO", "B5310");
        model = model.replace("S3653 Corby", "S3653");
        model = model.replace("C3322 Duos", "C3322");
        model = model.replace("B3410 Corby Plus", "B3410");
        model = model.replace("M7600 Beat DJ", "M7600");
        model = model.replace("F270 Beat", "F270");
        model = model.replace("S5560 Marvel", "S5560");
        model = model.replace("S5600 Preston", "S5600");
        model = model.replace("S5620 Monte", "S5620");
        model = model.replace("S7220 Lucido", "S7220");
        model = model.replace("C3782 Evan", "C3782");
        model = model.replace("S8003 Jet", "S8003");
        model = model.replace("D880 Duos", "D880");
        model = model.replace("D890 Duos", "D890");
        model = model.replace("D980 Duos", "D980");
        model = model.replace("E2222 DuoS", "E2222");
        model = model.replace("S5550 Shark", "S5550");
        model = model.replace("i7500 Galaxy", "i7500");
        model = model.replace("i8000 Omnia 2", "i8000");
        model = model.replace("F480 Tocco", "F480");
        model = model.replace("S5660 Galaxy Gio", "S5660,Galaxy Gio");
        model = model.replace("S5670 Galaxy Fit", "S5670,Galaxy Fit");
//        model = model.replace("S5830 527ce", "S5830,ace");
        model = model.replace("S5830T Galaxy S Mini", "S5830T");
        model = model.replace("i9000 Galaxy S", "i9000,Galaxy S");
        model = model.replace("B7350 Witu Pro", "B7350");
        model = model.replace("i9001 Galaxy S", "i9001");
        model = model.replace("i9003 Galaxy S", "i9003");
        model = model.replace("S3350 Chat 335", "S3350");
        model = model.replace("S3850 Corby", "S3850");
        model = model.replace("S5233T Star TV", "S5233T");
        model = model.replace("i9300 Galaxy S III", "i9300,Galaxy S III");
        model = model.replace("i9300 Galaxy S 3", "Galaxy S 3");
        model = model.replace("i8190 Galaxy S III Mini", "i8190");
        model = model.replace("i8190 Galaxy S 3 Mini", "i8190");
        model = model.replace("i9250 Galaxy Nexus Prime", "i9250,Nexus");
        model = model.replace("i9250 Google Galaxy Nexus", "i9250");
        model = model.replace("I9220 Galaxy S III", "I9220,Galaxy S III");
        model = model.replace("I9220 Galaxy S 3", "Galaxy S 3");
        return model;
    }

    private static String seTrimModel(String model) {
//        model = model.replace("XPERIA Arc X12", "");
//        model = model.replace("XPERIA", "");
        model = model.replace("X8 E15i", "X8,E15i");
        model = model.replace("W8 Walkman", "W8");
        model = model.replace("J20i Hazel", "J20i,Hazel");
        model = model.replace("J108i Cedar", "J108i,Cedar");
        model = model.replace("M1i Aspen", "M1i,Aspen");
        model = model.replace("X10 mini pro U20i", "X10,mini pro,U20i");
        model = model.replace("W100 Spiro", "W100,Spiro");
        model = model.replace("U1i Satio", "U1i,Satio");
        model = model.replace("J105 Naite", "J105,Naite");
        model = model.replace("F100 Jalou", "F100,Jalou");
        model = model.replace("LT26i Xperia S", "LT26i,Xperia S");
        model = model.replace("LT25i Xperia V", "LT25i,Xperia V");
        model = model.replace("Xperia E Dual", "Xperia E");
        model = model.replace("ST23i Xperia Miro", "ST23i,Miro");
        model = model.replace("ST21i Xperia Tipo Dual", "ST21i,Tipo");
        model = model.replace("ST21i Xperia Tipo", "ST21i,Tipo");
        model = model.replace("ST21i2 Xperia Tipo Dual", "ST21i2");
        model = model.replace("ST21i2 Xperia Tipo", "ST21i2");
        model = model.replace("ST21i Xperia Tapioca", "ST21i,Tapioca");
        model = model.replace("ST25i Xperia U", "ST25i,Xperia U");
        model = model.replace("J10i2 Elm", "J10i2");
        model = model.replace("C901 GreenHeart", "C901");
        model = model.replace("Live with Walkman", "Live");
        model = model.replace("Xperia mini pro", "mini pro");
        model = model.replace("Xperia X5 Pureness", "X5");
        model = model.replace("Xperia X5i Pureness", "X5i");
        model = model.replace("Xperia active", "active");
        model = model.replace("XPERIA Arc", "arc");
        model = model.replace("Xperia mini", "mini");
        model = model.replace("Xperia ray ST18i", "ST18i");
        model = model.replace("Xperia ray", "ray");
        model = model.replace("Xperia neo MT15i", "MT15i");
        model = model.replace("Xperia Neo V MT11i", "MT11i,Neo V");
        model = model.replace("XPERIA Neo", "neo");
        model = model.replace("XPERIA PLAY", "play");
        model = model.replace("Xperia Play", "play");
        model = model.replace("Xperia Pro MK16i", "MK16i");
        model = model.replace("XPERIA Pro", "pro");
        model = model.replace("Xperia Pro", "xperia");
        model = model.replace("XPERIA X1", "X1");
        model = model.replace("Xperia X1", "X1");
//        model = model.replace("XPERIA X10", "X10");
//        model = model.replace("Xperia X10", "X10");
        model = model.replace("XPERIA X2", "X2");
        model = model.replace("Xperia X2", "X2");
        model = model.replace("XPERIA X8", "X8");
        model = model.replace("Xperia X8", "X8");
        model = model.replace("Elm j10i", "j10i");
        model = model.replace("Elm J10i", "j10i");
        model = model.replace("Yari u100i", "u100i");
        model = model.replace("Yari U100i", "u100i");
        model = model.replace("Mix Walkman WT13i", "wt13i");
        model = model.replace("Mix Walkman", "Mix");
        model = model.replace("XPERIA Pureness", "Pureness");
//        model = model.replace("XPERIA X10 mini", "X10");
        model = model.replace("W150i Yendo", "W150i");
//        model = model.replace("X10 mini pro", "X10");
        model = model.replace("Walkman wt13i", "wt13i");
        model = model.replace("txt pro CK15i", "CK15i");
        model = model.replace("Txt Pro CK15i", "CK15i");
        model = model.replace("Vivaz pro u8i", "u8i");
        model = model.replace("Vivaz Pro U8i", "u8i");
        model = model.replace("Vivaz u5i", "u5i");
        model = model.replace("Vivaz U5i", "U5i");
        model = model.replace("Vivaz U5i", "U5i");
        model = model.replace("Xperia arc LT15i", "LT15i");
        model = model.replace("Xperia Arc LT15i", "LT15i");
        model = model.replace("Xperia arc S LT18i", "LT18i");
        model = model.replace("Xperia Arc S LT18i", "LT18i");
        model = model.replace("arc X12 Anzu", "X12");
        model = model.replace("WT19i Live", "WT19i");
        model = model.replace("W205 Hello Kitty", "W205");
        model = model.replace("W200i Walkman", "W200i");
        model = model.replace("C510 Syber-shot", "C510");
        model = model.replace("W580i Walkman", "W580i");
        model = model.replace("W760i Walkman", "W760i");
        model = model.replace("W980i Walkman", "W980i");
        model = model.replace("W995 Walkman", "W995");
        model = model.replace("W150 Yendo Walkman", "W150");
        model = model.replace("W20i Zylo Walkman", "W20i,Zylo");
        model = model.replace("St17i Xperia Active", "St17i");
        model = model.replace("Sk17i Xperia Mini Pro", "Sk17i");
        model = model.replace("St15i Xperia Mini", "St15i");
        return model;
    }

    private static String nokiaTrimModel(String model) {
        model = model.replace("6700 Classic Gold Edition", "6700");
        model = model.replace("5530 XpressMusic", "5530");
        model = model.replace("5130 XpressMusic", "5130");
        model = model.replace("5330 XpressMusic", "5330");
        model = model.replace("5730 XpressMusic", "5730");
        model = model.replace("5610 XpressMusic", "5610");
        model = model.replace("5700 XpressMusic", "5700");
        model = model.replace("5800 XpressMusic", "5800");
        model = model.replace("5300 XpressMusic", "5300");
        model = model.replace("5320 XpressMusic", "5320");
        model = model.replace("5220 XpressMusic", "5220");
        model = model.replace("5310 XpressMusic", "5310");
        model = model.replace("5630 XpressMusic", "5630");
        model = model.replace("3250 XpressMusic", "3250");
        model = model.replace("N810 WiMAX Edition", "N810");
        model = model.replace("5235 Ovi Music Unlimited", "5235");
        model = model.replace("5330 Mobile TV Edition", "5330");
        model = model.replace("2710 Navigation Edition", "2710");
        model = model.replace("N80 Internet Edition", "N80");
        model = model.replace("8800 Gun Metal Special Edition", "8800");
        model = model.replace("8800 Carbon Arte", "8800");
        model = model.replace("8800 Sapphire Arte", "8800");
        model = model.replace("N810 Internet Tablet", "N810");
        model = model.replace("N800 Internet Tablet", "N800");
        model = model.replace("Slide", "");
        model = model.replace("7100 Supernova", "7100");
        model = model.replace("7510 Supernova", "7510");
        model = model.replace("7610 Supernova", "7610");
        model = model.replace("7520 Supernova", "7520");
        model = model.replace("7210 Supernova", "7210");
        model = model.replace("7310 Supernova", "7310");
        model = model.replace("Mobile", "");
        model = model.replace("7205 Intrigue", "7205");
        model = model.replace("8600 Luna", "8600");
        model = model.replace("7900 Crystal", "7900");
        model = model.replace("Prism", "");
        model = model.replace("5800 Navigation", "5800");
        model = model.replace("2710 Navigation", "2710");
        model = model.replace("6710 Navigator", "6710");
        model = model.replace("6710 navigator", "6710");
        model = model.replace("C3-01 Gold Edition", "C3 01");
        model = model.replace("7373 Special Edition", "7373");
        model = model.replace("N73 Music", "N73");
        model = model.replace("3110 Evolve", "3110");
        model = model.replace("5500 Sport", "5500");
        model = model.replace("N-Gage QD", "N-Gage");
        model = model.replace("6700  Gold", "6700");
        model = model.replace("6700 classic Gold Edition", "6700");
        model = model.replace("6700 classic Illuvial", "6700");
        model = model.replace("6700  Illuvial", "6700");
        model = model.replace("8800 Sirocco Edition", "8800");
        model = model.replace("8800 Dark", "8800");
        model = model.replace("8800 Light Sirocco Edition", "8800");
        model = model.replace("8800 Gold Arte", "8800");
        model = model.replace("8800 Arte", "8800");
        model = model.replace("8800 Sirocco", "8800");
        model = model.replace("8800 Gun Metal", "8800");
        model = model.replace("8800 Light Edition", "8800");
        model = model.replace("8800 Gold Edition", "8800");
        model = model.replace("8GB", "");
        model = model.replace("16GB", "");
        model = model.replace("8MP", "");
        model = model.replace("Раскладной", "");
        model = model.replace("Ovi  Unlimited", "");
        model = model.replace("Communicator", "");
        model = model.replace("32GB", "");
        model = model.replace("5235 Comes With Music", "5235");
        model = model.replace("6210 Navigator", "6210");
        model = model.replace("6210 navigator", "6210");
        model = model.replace("5500 Music Edition", "5500");
        model = model.replace("5030 XpressRadio", "5030");
        model = model.replace("Comes With", "");
        model = model.replace("N70 Music", "N70");
        model = model.replace("6110 Navigator", "6110");
        model = model.replace("N80 Internet", "N80");
        model = model.replace("Special", "");
        model = model.replace("prism", "");
        model = model.replace("slide", "");
        model = model.replace("mini", "");
        model = model.replace("fold", "");
        model = model.replace("Fold", "");
        model = model.replace("Touch ", "");
        model = model.replace("and ", "");
        model = model.replace("Type", "");
        model = model.replace("Classic", "");
        model = model.replace("classic", "");
        model = model.replace("TV ", "");
        model = model.replace("5800 Edition", "5800");
        model = model.replace("N73 Edition", "N73");
        model = model.replace("N70 Edition", "N70");
        model = model.replace("5600 Sport", "5600");
        model = model.replace("1680 classic", "1680");
        model = model.replace("N97 Mini", "N97");
        model = model.replace("300 Asha", "300");
        model = model.replace("305 Asha", "305");
        model = model.replace("200 Asha", "200");
        model = model.replace("201 Asha", "201");
        model = model.replace("202 Asha", "202");
        model = model.replace("203 Asha", "203");
        model = model.replace("302 Asha", "302");
        model = model.replace("306 Asha", "306");
        model = model.replace("308 Asha", "308");
        model = model.replace("309 Asha", "309");
        model = model.replace("311 Asha", "311");
        model = model.replace("Asha 303", "303");
        model = model.replace("Lumia 510", "510");
        model = model.replace("Lumia 610", "610");
        model = model.replace("Lumia 710", "710");
        model = model.replace("6790 Surge", "6790");
        model = model.replace("E73 Mode", "E73");
        model = model.replace("6750 Mural", "6750");
        return model;
    }

    public static String filterName(String name) {
//        name = name.replace("BB00100 RHOD160", "");
        name = name.replace("HTC BA E270 DIAM171", "HTC E270,DIAM171");
        name = name.replace("HTC BA S100 PA16A", "S100,HTC PA16A");
        name = name.replace("HTC BA S120 ARTE160 WIZA16", "HTC S120,ARTE160,WIZA16");
        name = name.replace("HTC BA S130 BREE160", "HTC S130,BREE160");
        name = name.replace("HTC BA S170 ATHE160", "HTC S170,ATHE160");
        name = name.replace("HTC BA S180 LIBR160", "HTC S180,LIBR160");
        name = name.replace("HTC BA S190 HERA160", "HTC S190,HERA160");
        name = name.replace("HTC BA S210 KAIS160", "HTC S210,KAIS160");
        name = name.replace("HTC BA S230 ELF0160", "HTC S230,ELF0160");
        name = name.replace("HTC BA S240 POLA160", "HTC S240,POLA160");
        name = name.replace("HTC BA S260 NIKI160", "HTC S260,NIKI160");
        name = name.replace("HTC BA S270 DIAM160", "HTC S270,DIAM160");
        name = name.replace("HTC BA S310 TRIN160", "HTC S310,TRIN160");
        name = name.replace("HTC BA S320 PHAR160", "HTC S320,PHAR160");
        name = name.replace("HTC BA S330 POLA160", "HTC S330,POLA160");
        name = name.replace("HTC BA S330 JADE160", "HTC S330,JADE160");
        name = name.replace("HTC BA S340 BLAC160", "HTC S340,BLAC160");
        name = name.replace("HTC BA S350 SAPP160", "HTC S350,SAPP160");
        name = name.replace("HTC BA S360 TOPA160", "HTC S360,TOPA160");
        name = name.replace("HTC BA S370 DREA160", "HTC S370,DREA160");
        name = name.replace("HTC BA S380 TWIN160", "HTC S380,TWIN160");
        name = name.replace("HTC BA S390 RHOD160", "HTC S390,RHOD160");
        name = name.replace("HTC BA S400 BB81100", "HTC S400,BB81100");
        name = name.replace("HTC BA S410 BB99100", "HTC S410,BB99100");
        name = name.replace("HTC BA S420 BB00100 RHOD160", "HTC S420,BB00100,RHOD160");
        name = name.replace("HTC BA S420 BB00100", "HTC S420,BB00100");
        name = name.replace("HTC BA S430 BB92100", "HTC S430,BB92100");
        name = name.replace("HTC BA S450 BB96100", "HTC S450,BB96100");
        name = name.replace("HTC BA S470 BD26100", "HTC S470,BD26100");
        name = name.replace("HTC BA S520 BB96100", "HTC S520,BB96100");
        name = name.replace("HTC BA S520 BG32100", "BG32100");
        name = name.replace("HTC BA S530", "HTC S530");
        name = name.replace("HTC BA S560 BG58100", "HTC S560,BG58100");
        name = name.replace("HTC BA S570 BH06100", "HTC S570,BH06100");
        name = name.replace("HTC BA E270 DIAM171", "HTC E270,DIAM171");
        name = name.replace("HTC BA S590 BG86100", "HTC S590,BG86100");
        name = name.replace("HTC BA S160", "HTC S160");
        name = name.replace("HTC BA S280", "HTC S280");
        name = name.replace("HTC BA S350", "HTC S350");
        name = name.replace("HTC BA S450", "HTC S450");
        name = name.replace("HTC BA S540", "HTC S540");
        name = name.replace("HTC BA S580", "HTC S580");
        name = name.replace("HTC BA S780", "HTC S780");
        name = name.replace("HTC BA S640", "HTC S640");
        name = name.replace("LGTL-GKIP-1000", "GKIP,LGTL");
        name = name.replace("SBPL0076324", "SBPL");
        name = name.replace("BlackBerry Mini USB Charger", "");
        name = name.replace("BlackBerry Micro USB Charger", "");
        name = name.replace("HTC Mini USB Charger", "");
        name = name.replace("HTC Micro USB Charger", "");
        name = name.replace("Motorola Mini USB Charger", "");
        name = name.replace("Motorola Micro USB Charger", "");
        name = name.replace("Alcatel C651", "");
        name = name.replace("Siemens C35", "");
        name = name.replace("Siemens C45", "");
        name = name.replace("Siemens C65", "");
        name = name.replace("Siemens CF62", "");
        name = name.replace("Siemens ME45", "");
        name = name.replace("Siemens SL55", "");
        name = name.replace("Siemens SL65", "");
        name = name.replace("ETA-P10EBEGSTD", "P10EBEGSTD");
        if (name.contains("-")) {
            name = name + "," + name.replaceAll("-","");
        }
        return name;
    }
}
